<%--
  Created by IntelliJ IDEA.
  User: evans
  Date: 2018/4/25
  Time: 上午12:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>home</title>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta content="telephone=no,email=no" name="format-detection">
    <meta name="screen-orientation" content="portrait">
    <meta name="x5-orientation" content="portrait">
    <link rel="stylesheet" href="../../css/base.css">
    <link rel="stylesheet" href="../../css/style.css">

</head>
<body>

<h1>www.soico.co-没有中间环节的数币投资平台</h1>

<!-- header -->
<%@include file="top.jsp" %>
<!-- header end -->
<script>
    var user = '${user}';
    var time = '${time}';
    var auth = '${auth}';

    function search() {
        var type = getProjectType();
        var likeContet = getSeartchContent();

        var path = "/projectsSkip?user=" + user + "&time=" + time + "&auth=" + auth + "&type=" + type + "&name=" + likeContet;
        window.location.href = path;
    }

    function getProjectType() {
        var running = $("#running").val();
        var ready = $("#ready").val();
        var finish = $("#finish").val();
        if (running == '1') return 0;
        if (ready == '1') return 2;
        if (finish == '1') return 1;
    }
    function getSeartchContent() {
        return $('#searchContent').val() == null ? "" : $('#searchContent').val()
    }

    function gotoProjectDetail(projectPk) {
        var path = "/project?user=" + user + "&time=" + time + "&auth=" + auth+ "&project="+projectPk;
        window.location.href = path;
    }

</script>
<!-- main -->
<div class="browser-header">
    <div class="wrapper">
        <h2 class="title">热门项目</h2>
        <div class="banner-con">
            <div class="banner">
                <div class="wrap">
                    <c:forEach items="${top4}" var="project">
                        <a href="javascript:;">
                            <img src="img/${project.project_name}.png" onclick="gotoProjectDetail('${project.pk}')">
                            <p class="name">${project.project_name}</p>
                            <p class="level">${project.project_level}级</p>
                            <p class="time">
                                <span><fmt:formatDate value="${project.ico_start}" pattern="yyyy-MM-dd"/></span> 开售</p>
                        </a>
                    </c:forEach>
                </div>
            </div>
            <a class="left-arrow" href="javascript:;"></a>
            <a class="right-arrow" href="javascript:;"></a>
        </div>
    </div>
</div>

<div class="browser-main">
    <div class="tab-head">
        <div class="tabs">
            <a class="active" href="javascript:;">正在众筹
                <span>（${running}）</span>
            </a>
            <a href="javascript:;">即将开始
                <span>（${ready}）</span>
            </a>
            <a href="javascript:;">已结束
                <span>（${finish}）</span>
            </a>
        </div>
        <div class="search-box" >
            <input id="searchContent" type="text" name="" value="">
            <button type="submit" onclick="search()">搜索</button>
        </div>
    </div>
    <div class="tabcons">
        <div class="con active">
            <input id="running" value="1" type="hidden"/>
            <div class="table-head">
                <span class="name">名称及简介</span>
                <span class="level">项目评级</span>
                <span class="gold">代币</span>
                <span class="collect">已募集</span>
                <span class="time">募集时间</span>
                <span class="explain">投资说明</span>
            </div>
            <ul class="browser-list">
                <c:forEach items="${runningProjects}" var="project">
                    <li>
                        <p class="name">
                            <img src="img/${project.project_name}.png" alt="">
                            <span class="n1">${project.project_name}</span>
                            <span class="n2">${project.project_basic_info}</span>
                        </p>
                        <p class="level">
                            <span class="orange">${project.project_level}级</span>
                        </p>
                        <p class="gold">${project.ico_code}</p>
                        <p class="collect">${project.total_amount}ETH</p>
                        <p class="time">><fmt:formatDate value="${project.ico_start}" pattern="yyyy-MM-dd"/> ~
                            <fmt:formatDate value="${project.ico_end}" pattern="yyyy-MM-dd"/></p>
                        <p class="explain">限制中国地区</p>
                        <p class="act">
                            <c:choose>
                                <c:when test="${project.project_status== '1'}">
                                    <span>募集结束</span>
                                </c:when>
                                <c:when test="${project.project_status== '2'}">
                                    <span>准备中</span>
                                </c:when>
                                <c:otherwise>
                                    <a href="javascript:;" onclick="gotoProjectDetail('${project.pk}')">我要募集</a>
                                </c:otherwise>
                            </c:choose>
                        </p>
                    </li>
                </c:forEach>

            </ul>
        </div>
        <div class="con">
            <input id="ready" value="0" type="hidden"/>
            <div class="table-head">
                <span class="name">名称及简介</span>
                <span class="level">项目评级</span>
                <span class="gold">代币</span>
                <span class="collect">已募集</span>
                <span class="time">募集时间</span>
                <span class="explain">投资说明</span>
            </div>
            <ul class="browser-list">
                <c:forEach items="${readyProjects}" var="project">
                    <li>
                        <p class="name">
                            <img src="img/${project.project_name}.png" alt="">
                            <span class="n1">${project.project_name}</span>
                            <span class="n2">${project.project_basic_info}</span>
                        </p>
                        <p class="level">
                            <span class="orange">${project.project_level}级</span>
                        </p>
                        <p class="gold">${project.ico_code}</p>
                        <p class="collect">${project.total_amount}ETH</p>
                        <p class="time">><fmt:formatDate value="${project.ico_start}" pattern="yyyy-MM-dd"/> ~
                            <fmt:formatDate value="${project.ico_end}" pattern="yyyy-MM-dd"/></p>
                        <p class="explain">限制中国地区</p>
                        <p class="act">
                            <c:choose>
                                <c:when test="${project.project_status== '1'}">
                                    <span>募集结束</span>
                                </c:when>
                                <c:when test="${project.project_status== '2'}">
                                    <span>准备中</span>
                                </c:when>
                                <c:otherwise>
                                    <a href="javascript:;">我要募集</a>
                                </c:otherwise>
                            </c:choose>
                        </p>
                    </li>
                </c:forEach>
            </ul>
        </div>
        <div class="con">
            <input id="finish" value="0" type="hidden"/>
            <div class="table-head">
                <span class="name">名称及简介</span>
                <span class="level">项目评级</span>
                <span class="gold">代币</span>
                <span class="collect">已募集</span>
                <span class="time">募集时间</span>
                <span class="explain">投资说明</span>
            </div>
            <ul class="browser-list">
                <c:forEach items="${finishProjects}" var="project">
                    <li>
                        <p class="name">
                            <img src="img/${project.project_name}.png" alt="">
                            <span class="n1">${project.project_name}</span>
                            <span class="n2">${project.project_basic_info}</span>
                        </p>
                        <p class="level">
                            <span class="orange">${project.project_level}级</span>
                        </p>
                        <p class="gold">${project.ico_code}</p>
                        <p class="collect">${project.total_amount}ETH</p>
                        <p class="time">><fmt:formatDate value="${project.ico_start}" pattern="yyyy-MM-dd"/> ~
                            <fmt:formatDate value="${project.ico_end}" pattern="yyyy-MM-dd"/></p>
                        <p class="explain">限制中国地区</p>
                        <p class="act">
                            <c:choose>
                                <c:when test="${project.project_status== '1'}">
                                    <span>募集结束</span>
                                </c:when>
                                <c:when test="${project.project_status== '2'}">
                                    <span>准备中</span>
                                </c:when>
                                <c:otherwise>
                                    <a href="javascript:;">我要募集</a>
                                </c:otherwise>
                            </c:choose>
                        </p>
                    </li>
                </c:forEach>
            </ul>
        </div>
    </div>
</div>
<!-- main end -->

<!-- foot -->
<%@include file="footer.jsp" %>
<!-- foot end -->

<!-- pop -->
<%@include file="common_login.jsp" %>
<!-- pop end -->
<script src="//captcha.luosimao.com/static/js/api.js"></script>
</body>
<!--JS文件-->
<script type="text/javascript" src="../../js/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="../../js/main.js" charset="utf-8"></script>
<%--<script type="text/javascript" src="../../js/jquery.easyui.min.js" charset="utf-8"></script>--%>
<script src="../../js/clipboard.min.js"></script>
<script src="../../js/echarts.min.js"></script>
</html>
